import { defineStore } from "pinia";

export interface MonitorTableList {
  show: boolean;
  type: string;
  data:any;
  showArrow:boolean;
}

const useMonitorTableList = defineStore("monitortablelist", {
  state: (): MonitorTableList => {
    return {
      show: false, //是否显示弹窗
      type: '', //弹窗类型
      data:[], //弹窗数据
      showArrow:false, //是否显示展开收起箭头
    }
  },
  actions: {
    setShowArrow(val:boolean) {
      this.showArrow = val;
    },
    setState(val,type,data) {
      this.show = val;
      this.type = type;
      this.data = data;
    },
  },
});

export default useMonitorTableList;